﻿Namespace GameState
  Public Class FirstMoveGameState
    Inherits AbstractGameState

    ''' <summary>
    ''' select the first card
    ''' </summary>
    Friend Overrides Sub DoTurn(ByVal card As Card)
      card.Turn()

      'keep cards
      FirstCard = card
      SecondCard = Nothing

      'find player who is making a move
      Dim player As Player = MovingPlayer()
      If player Is Nothing Then
        Throw New InvalidOperationException("No player found who owns the turn")
      End If

      'wait for the second card
      player.SetTurnState(player.TurnStateE.MayMakeSecondMove)

      'set next gamestate
      adviceGameState(Of SecondMoveGameState)()
    End Sub

  End Class
End Namespace